package com.forekonw.demo7;

public class Swallow extends Bird {
    public void fly(){
        System.out.println("fly......");
    }
    public static void main(String[] args) {
        //创建子类的对象
        Swallow swallow = new Swallow();
        swallow.setName("花燕子");
        swallow.setColor("花色");
        swallow.eat();
        swallow.fly();

        System.out.println("-------------------------------------");

        Swallow swallow1 = new Swallow();
        swallow1.setName("花燕子12");
        swallow1.setColor("花色12");
        swallow1.eat();
        swallow1.fly();
    }
}
